package com.itheima.search.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用于同步ES的新闻实体类
 * @author NicelYHHello
 */
@Data
public class NewsDocument implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long newsId;
    private String title;
    private Integer typeId;
    private String content;
    private Byte delayTime;
    private String source;
    private String createBy;
    // 日期时间字段格式化（与消息中的格式保持一致）
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
    private String updateBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;
    private Short status;
    private String remark;
    private Integer noticeId;
}
